//package com.database;
//
//public final class TableStructure {
//	/** The name of the database file on the file system */
//	public static final String DATABASE_NAME = "vsmile_db";
//	/** The version of the database that this class understands. */
//	public static final int DATABASE_VERSION = 5;
//
//	public static class UserAccountTable {
//
//		// Property
//		public static final String TABLE_NAME = "UserAccount";
//		public static final String ID = "id";
//		public static final String NAME = "username";
//		public static final String PASS_WORD = "password";
//		public static final String INFO = "info";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String NAME_TYPE = "TEXT NOT NULL";
//		static final String PASS_WORD_TYPE = "TEXT NOT NULL";
//		static final String INFO_TYPE = "TEXT";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + NAME + " "
//				+ NAME_TYPE + "," + " " + PASS_WORD + " " + PASS_WORD_TYPE
//				+ "," + " " + INFO + " " + INFO_TYPE + ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//	}
//
//	public static class UserLocationTable {
//		// Property
//		public static final String TABLE_NAME = "UserLocation";
//		public static final String ID = "id";
//		public static final String LATITUDE = "latitude";
//		public static final String LONGITUDE = "longitude";
//		public static final String LOCATION_INFO = "location_info";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String LATITUDE_TYPE = "REAL NOT NULL";
//		static final String LONGITUDE_TYPE = "REAL NOT NULL";
//		static final String LOCATION_INFO_TYPE = "TEXT";
//
//		// SQL
//		public static final String CREATE_STATEMENT = "CREATE TABLE "
//				+ TABLE_NAME + "(" + " " + ID + " " + ID_TYPE + "," + " "
//				+ LATITUDE + " " + LATITUDE_TYPE + "," + " " + LONGITUDE + " "
//				+ LONGITUDE_TYPE + "," + " " + LOCATION_INFO + " "
//				+ LOCATION_INFO_TYPE + ");";
//
//		public static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//	}
//
//	public static class TrafficTable {
//
//		// Property
//		public static final String TABLE_NAME = "Traffic";
//		public static final String ID = "id";
//		public static final String TITLE = "title";
//		public static final String COMMENT = "comment";
//		public static final String START_TIME = "start_time";
//		public static final String END_TIME = "end_time";
//		public static final String CATEGORY = "category";
//		public static final String LATITUDE = "latitude";
//		public static final String LONGITUDE = "longitude";
//		public static final String USER_ID = "user";
//		public static final String IS_ADMIN = "is_admin";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String TITLE_TYPE = "TEXT";
//		static final String COMMENT_TYPE = "TEXT";
//		static final String START_TIME_TYPE = "INTEGER NOT NULL";
//		static final String END_TIME_TYPE = "INTEGER";
//		static final String CATEGORY_TYPE = "TEXT";
//		static final String LATITUDE_TYPE = "REAL NOT NULL";
//		static final String LONGITUDE_TYPE = "REAL NOT NULL";
//		static final String USER_ID_TYPE = "INTEGER NOT NULL ,FOREIGN KEY (user) REFERENCES UserAccount(id)";
//		static final String IS_ADMIN_TYPE = "INTEGER";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + LATITUDE + " "
//				+ LATITUDE_TYPE + "," + " " + LONGITUDE + " " + LONGITUDE_TYPE
//				+ "," + " " + START_TIME + " " + START_TIME_TYPE + "," + " "
//				+ END_TIME + " " + END_TIME_TYPE + "," + " " + TITLE + " "
//				+ TITLE_TYPE + "," + " " + CATEGORY + " " + CATEGORY_TYPE + ","
//				+ " " + COMMENT + " " + COMMENT_TYPE + "," + " " + IS_ADMIN
//				+ " " + IS_ADMIN_TYPE + "," + " " + USER_ID + " "
//				+ USER_ID_TYPE + ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//
//		static final String TRIGGER_STATEMENT = "CREATE TRIGGER fk_usertraffic_userid BEFORE INSERT ON "
//				+ TABLE_NAME
//				+ " FOR EACH ROW BEGIN SELECT CASE WHEN ((SELECT id FROM UserAccount WHERE id = new."
//				+ USER_ID
//				+ ") IS NULL) THEN RAISE (ABORT,'Foreign Key Violation') END; END;";
//
//		static final String DROP_TRIGGER_STATEMENT = "DROP TRIGGER IF EXISTS fk_usertraffic_userid";
//	}
//
//	public static class EventTable {
//
//		// Property
//		public static final String TABLE_NAME = "Event";
//		public static final String ID = "id";
//		public static final String TITLE = "title";
//		public static final String COMMENT = "comment";
//		public static final String START_TIME = "start_time";
//		public static final String END_TIME = "end_time";
//		public static final String CATEGORY = "category";
//		public static final String LATITUDE = "latitude";
//		public static final String LONGITUDE = "longitude";
//		public static final String USER_ID = "user";
//		// Quang thoi gian - tinh theo phut
//		public static final String MINUTE_DURATION = "minute_duration";
//		// tan suat
//		public static final String REPEAT_FREQUENCY = "repeat_frequency";
//		// 0 - khong lap; 1 - gio; 2 - ngay; 3 - tuan; 4 - thang; 5- nam
//		public static final String REPEAT_TYPE = "repeat_type";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String TITLE_TYPE = "TEXT";
//		static final String COMMENT_TYPE = "TEXT";
//		static final String START_TIME_TYPE = "INTEGER NOT NULL";
//		static final String END_TIME_TYPE = "INTEGER";
//		static final String CATEGORY_TYPE = "TEXT";
//		static final String LATITUDE_TYPE = "REAL NOT NULL";
//		static final String LONGITUDE_TYPE = "REAL NOT NULL";
//		static final String USER_ID_TYPE = "INTEGER NOT NULL ,FOREIGN KEY (user) REFERENCES UserAccount(id)";
//		static final String MINUTE_DURATION_TYPE = "INTEGER";
//		static final String REPEAT_FREQUENCY_TYPE = "INTEGER";
//		static final String REPEAT_TYPE_TYPE = "INTEGER";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + LATITUDE + " "
//				+ LATITUDE_TYPE + "," + " " + LONGITUDE + " " + LONGITUDE_TYPE
//				+ "," + " " + START_TIME + " " + START_TIME_TYPE + "," + " "
//				+ END_TIME + " " + END_TIME_TYPE + "," + " " + TITLE + " "
//				+ TITLE_TYPE + "," + " " + CATEGORY + " " + CATEGORY_TYPE + ","
//				+ " " + COMMENT + " " + COMMENT_TYPE + "," + " "
//				+ MINUTE_DURATION + " " + MINUTE_DURATION_TYPE + "," + " "
//				+ REPEAT_FREQUENCY + " " + REPEAT_FREQUENCY_TYPE + "," + " "
//				+ REPEAT_TYPE + " " + REPEAT_TYPE_TYPE + "," + " " + USER_ID
//				+ " " + USER_ID_TYPE + ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//
//		static final String TRIGGER_STATEMENT = "CREATE TRIGGER fk_userevent_userid BEFORE INSERT ON "
//				+ TABLE_NAME
//				+ " FOR EACH ROW BEGIN SELECT CASE WHEN ((SELECT id FROM UserAccount WHERE id = new."
//				+ USER_ID
//				+ ") IS NULL) THEN RAISE (ABORT,'Foreign Key Violation') END; END;";
//
//		static final String DROP_TRIGGER_STATEMENT = "DROP TRIGGER IF EXISTS fk_userevent_userid";
//	}
//
//	public static class PlaceTable {
//
//		// Property
//		public static final String TABLE_NAME = "Place";
//		public static final String ID = "id";
//		public static final String TITLE = "title";
//		public static final String COMMENT = "comment";
//		public static final String CATEGORY = "category";
//		public static final String LATITUDE = "latitude";
//		public static final String LONGITUDE = "longitude";
//		public static final String USER_ID = "user";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String TITLE_TYPE = "TEXT";
//		static final String COMMENT_TYPE = "TEXT";
//		static final String CATEGORY_TYPE = "TEXT";
//		static final String LATITUDE_TYPE = "REAL NOT NULL";
//		static final String LONGITUDE_TYPE = "REAL NOT NULL";
//		static final String USER_ID_TYPE = "INTEGER NOT NULL, FOREIGN KEY (user) REFERENCES UserAccount(id)";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + LATITUDE + " "
//				+ LATITUDE_TYPE + "," + " " + LONGITUDE + " " + LONGITUDE_TYPE
//				+ "," + " " + TITLE + " " + TITLE_TYPE + "," + " " + CATEGORY
//				+ " " + CATEGORY_TYPE + "," + " " + COMMENT + " "
//				+ COMMENT_TYPE + "," + " " + USER_ID + " " + USER_ID_TYPE
//				+ ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//
//		static final String TRIGGER_STATEMENT = "CREATE TRIGGER fk_userplace_userid BEFORE INSERT ON "
//				+ TABLE_NAME
//				+ " FOR EACH ROW BEGIN SELECT CASE WHEN ((SELECT id FROM UserAccount WHERE id = new."
//				+ USER_ID
//				+ ") IS NULL) THEN RAISE (ABORT,'Foreign Key Violation') END; END;";
//
//		static final String DROP_TRIGGER_STATEMENT = "DROP TRIGGER IF EXISTS fk_userplace_userid";
//	}
//
//	public static class DirectoryTable {
//
//		// Property
//		public static final String TABLE_NAME = "Directory";
//		public static final String ID = "id";
//		public static final String TITLE = "title";
//		public static final String COMMENT = "comment";
//		public static final String CATEGORY = "category";
//		public static final String LATITUDE = "latitude";
//		public static final String LONGITUDE = "longitude";
//		public static final String USER_ID = "user";
//		public static final String PERSON_NAME = "person_name";
//		public static final String EMAIL = "email";
//		public static final String PHONE = "phone";
//		public static final String WEBSITE = "website";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String TITLE_TYPE = "TEXT";
//		static final String COMMENT_TYPE = "TEXT";
//		static final String CATEGORY_TYPE = "TEXT";
//		static final String LATITUDE_TYPE = "REAL NOT NULL";
//		static final String LONGITUDE_TYPE = "REAL NOT NULL";
//		static final String USER_ID_TYPE = "INTEGER NOT NULL ,FOREIGN KEY (user) REFERENCES UserAccount(id)";
//		static final String PERSON_NAME_TYPE = "TEXT NOT NULL";
//		static final String EMAIL_TYPE = "TEXT";
//		static final String PHONE_TYPE = "TEXT NOT NULL";
//		static final String WEBSITE_TYPE = "TEXT";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + LATITUDE + " "
//				+ LATITUDE_TYPE + "," + " " + LONGITUDE + " " + LONGITUDE_TYPE
//				+ "," + " " + TITLE + " " + TITLE_TYPE + "," + " " + CATEGORY
//				+ " " + CATEGORY_TYPE + "," + " " + COMMENT + " "
//				+ COMMENT_TYPE + "," + " " + PERSON_NAME + " "
//				+ PERSON_NAME_TYPE + "," + " " + EMAIL + " " + EMAIL_TYPE + ","
//				+ " " + PHONE + " " + PHONE_TYPE + "," + " " + WEBSITE + " "
//				+ WEBSITE_TYPE + "," + " " + USER_ID + " " + USER_ID_TYPE
//				+ ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//
//		static final String TRIGGER_STATEMENT = "CREATE TRIGGER fk_userdirectory_userid BEFORE INSERT ON "
//				+ TABLE_NAME
//				+ " FOR EACH ROW BEGIN SELECT CASE WHEN ((SELECT id FROM UserAccount WHERE id = new."
//				+ USER_ID
//				+ ") IS NULL) THEN RAISE (ABORT,'Foreign Key Violation') END; END;";
//
//		static final String DROP_TRIGGER_STATEMENT = "DROP TRIGGER IF EXISTS fk_userdirectory_userid";
//	}
//
//	public static class TrackingTable {
//		// Property
//		public static final String TABLE_NAME = "Tracking";
//		public static final String ID = "id";
//		public static final String TRACKING_NAME = "tracking_name";
//		public static final String USER_ID = "user";
//
//		// Type
//		static final String ID_TYPE = "INTEGER PRIMARY KEY AUTOINCREMENT";
//		static final String TRACKING_NAME_TYPE = "TEXT NOT NULL";
//		static final String USER_ID_TYPE = "INTEGER NOT NULL, FOREIGN KEY (user) REFERENCES UserAccount(id)";
//
//		// SQL
//		static final String CREATE_STATEMENT = "CREATE TABLE " + TABLE_NAME
//				+ "(" + " " + ID + " " + ID_TYPE + "," + " " + TRACKING_NAME
//				+ " " + TRACKING_NAME_TYPE + "," + " " + USER_ID + " "
//				+ USER_ID_TYPE + ");";
//
//		static final String DROP_STATEMENT = "DROP TABLE IF EXISTS "
//				+ TABLE_NAME;
//
//		static final String TRIGGER_STATEMENT = "CREATE TRIGGER fk_usertracking_userid BEFORE INSERT ON "
//				+ TABLE_NAME
//				+ " FOR EACH ROW BEGIN SELECT CASE WHEN ((SELECT id FROM UserAccount WHERE id = new."
//				+ USER_ID
//				+ ") IS NULL) THEN RAISE (ABORT,'Foreign Key Violation') END; END;";
//
//		static final String DROP_TRIGGER_STATEMENT = "DROP TRIGGER IF EXISTS fk_usertracking_userid";
//	}
//}
